-- GENERATED SPELL FOR [Hatecrest Screamer] --


function spell0_5335(pUnit, Event) --@Renew,n/a--
pUnit:FullCastSpellOnTarget(6078,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5335', 15000, 1)
end

function spell1_5335(pUnit, Event) --@Sonic Burst,Self--
pUnit:FullCastSpellOnTarget(8281,pUnit)
pUnit:RegisterEvent('Sorts_5335', 6350, 1)
end

function Sorts_5335(pUnit, Event)
local choix_sorts_5335 = math.random(0, 1)
if choix_sorts_5335 == 0 then
pUnit:RegisterEvent('spell0_5335', 1, 1)
end
if choix_sorts_5335 == 1 then
pUnit:RegisterEvent('spell1_5335', 1, 1)
end
end

function mob5335_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5335', math.random(1500, 3000), 1)
end

function mob5335_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5335_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5335_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5335, 1, 'mob5335_Action')
RegisterUnitEvent(5335, 2, 'mob5335_Leave')
RegisterUnitEvent(5335, 3, 'mob5335_Kill')
RegisterUnitEvent(5335, 4, 'mob5335_Die')
